<?php
namespace Home\Controller;
use Think\Controller;
class WebupController extends Controller {

    public function index() {
        $m_patient = M('patient');

        $this->display();
    }
    public function uploadimage(){
        echo '123hhh';die;
        /*$upload             = new \Think\Upload();
        $upload->maxSize    = 3145728;
        $upload->exts       = array('jpg','gif','jpeg');
        $upload->rootPath   = 'Public/uploads/image/';
        $upload->autoSub    = true;
        $upload->subName    = array('date','Ymd');
        $upload->saveName   = date('YmdHis').'_'.mt_rand(10000,99999);
        echo '+++'.$upload->saveName;die;
        $info = $upload->upload();
        echo $upload->saveName;die;
        $return_data = array('code'=>'','msg'=>'','url'=>'');
        if(!$info){
            $return_data['code']    = -1;
            $return_data['msg']     = $upload->getError();
        }else{
            $return_data['code']    = 1;
            $return_data['url']     = '/Public/uploads/image/'.$info['file']['savepath'].$info['file']['savename'];
        }
        $this->ajaxReturn($return_data);*/
    }

    public function test(){
        $this->display();

    }

    public function ajax_upload(){//异步上传图片的地址
        // 根据自己的业务调整上传路径、允许的格式、文件大小
        ajax_upload('uploads/image/');//公共方法
    }
    public function webuploader(){//最终提交表单的地址
        if(IS_POST){
            var_dump($_POST);die;
        }else{
            $this->display();
        }
    }
}